package com.gohome.gohomechat.ui.activity;

import android.content.Intent;
import android.support.v4.view.ViewPager;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.view.View;
import android.widget.ImageView;

import com.gohome.gohomechat.R;
import com.gohome.gohomechat.ui.adapter.GuidePageAdapter;
import com.gohome.gohomechat.widget.CircleIndicator;

public class GuideActivity extends AppCompatActivity {

    private ImageView go_main;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_guide);
        go_main = (ImageView) findViewById(R.id.go_main);
        ViewPager viewPager = (ViewPager) findViewById(R.id.viewpager);
        CircleIndicator indicator = (CircleIndicator) findViewById(R.id.indicator);
        viewPager.setAdapter(new GuidePageAdapter());
        indicator.setViewPager(viewPager);

        go_main.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                Intent intent = new Intent(GuideActivity.this,LoginActivity.class);
                startActivity(intent);
            }
        });
    }
}
